";
echo " | ";
echo "";
echo "$row[description]";
if (strlen($passfile) > 0)
$nartarget=$passfile;
else
$nartarget = substr($dirarray[$base0ptr],0,strlen($dirarray[$base0ptr])-9).".jpg"; // extract the file two digit
//echo "nartarget = $nartarget";
$nresult=mysql_query("select * from narratives where nartarget=\"$nartarget\"");
$ndami = mysql_num_rows($nresult);
if ($ndami>0)
{
$nrow=mysql_fetch_array($nresult);
echo "$nrow[narrative]";
};
if (!empty($dami))
{
// $onedigitptr = sprintf("%01d",$passptr);
echo " Photo $passptr of $dami ";
if ($passptr > 1)
{
$prevptr = $passptr - 1;
// $prevptr = sprintf("%02d",$prevptr);
echo "<<prev | ";
};
echo "narratives";
if ($passptr < $dami)
{
$nextptr = $passptr + 1;
// $nextptr = sprintf("%02d",$nextptr);
echo " | next>> ";
};
echo " ";
};
// $thmbfile = "$dirarray[$base0ptr];
$imgfilename = substr($dirarray[$base0ptr],0,strpos($dirarray[$base0ptr],"_")) . ".jpg";
// $imgfilename = $wpt . $ptr . ".jpg";
$result=mysql_query("select * from contributions left join contributors using (conid) where confilename=\"$imgfilename\"");
if ($row=mysql_fetch_array($result))
{
if ($row[conyear]>0) $conyear= "(" . $row[conyear] . ")";
if (strlen(trim($row[conpenname]))>0) $signature=$row[conpenname]; else $signature=$row[conname];
echo "© Photo by: $signature $conyear";
}
else
{
echo " © Photo by: (not yet credited)";
};
echo " All Rights Reserved ";
echo " |